<?php

/**
 * default actions.
 *
 * @package    sf_sandbox
 * @subpackage default
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class defaultActions extends sfActions
{
	public function executeIndex(sfWebRequest $request){}

	public function executeDelete(sfWebRequest $request)
	{
		if($request->isXmlHttpRequest()) {
			if($request->getParameter('media_id')) {
				$Media = Doctrine::getTable('Media')->find($request->getParameter('media_id'));
				$Media->delete();
			}
			if($request->getParameter('comment_id')) {
				$comment = Doctrine::getTable('Comment')->find($request->getParameter('comment_id'));
				$comment->delete();
			}
			return sfView::NONE;
		} else {
			$this->redirect('default/index');
		}
	}
}
